package t_657

func judgeCircle(moves string) bool {
	var R, L, U, D int = 0, 0, 0, 0
	for _, v := range moves {
		switch {
		case v == 'R':
			R++
		case v == 'L':
			L++
		case v == 'U':
			U++
		case v == 'D':
			D++
		}
	}
	return R == L && U == D

}
